package dujiu.luogu.circulation;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

public class P4956 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        // 一共要连续筹集52个星期
        int a = n / 52 / 7;
        List<Integer> list1 = new ArrayList<>();
        for (int x = 1; x <= 100 ; x++) {
            for (int k = 1; k <= 100 ; k++) {
                if ((x + 3*k) == a){
                    list1.add(x);
                }
            }
        }
        int max = Collections.max(list1);
        System.out.println(max);
        System.out.println((a - max)/3);
    }
}
